package com.xxmw.transaction.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxmw.transaction.model.app.UserBrick;
import com.xxmw.transaction.vo.UserBrickDetailVo;

import java.util.List;

/**
 * 用户搬砖策略服务
 * @author luowenliang
 * @since 2020/5/18 11:56
 */
public interface UserBrickService extends IService<UserBrick> {

    /**
     * 根据策略id获取
     * @param brickIdList
     * @return
     */
    List<UserBrick> findByBrickIds (List<Integer> brickIdList);

    /**
     * 根据搬砖ID获取
     * @param brickId
     * @return
     */
    List<UserBrick> findByBrickId (Integer brickId);

    /**
     * 根据用户获取对应币种的搬砖列表
     * @param userId
     * @return
     */
    List<UserBrickDetailVo> findByUserId (Long userId, String symbol);

    void updateStatus(Long userId, Integer id, Integer status);

    void saveOrUpdate(UserBrick userBrick, String bourses, String username);

    /**
     * 将所有vip过期的策略关闭
     */
    void closeUserBrickByVip ();
}
